.<template>
  <div class="w100 h100 top">
    <div class="header w100">
      <van-icon
        @click="back"
        class="hh"
        name="arrow-left"
        color="rgb(248, 250, 252)"
        size="40"
      />
      <p class="header1">排行榜</p>
    </div>
    <div class="main">
      <p class="title w100">
        <span>瞬时吸欧TOP榜</span>
        <img
          src="https://lanhu.oss-cn-beijing.aliyuncs.com/pstwos2i4d18e7gmdjvhfzyabz9rzxy3go844e659a-d559-4a57-8acc-543cde949e8f"
          alt=""
        />
      </p>
      <div class="content">
        <div class="photo">
          <img class="one" v-lazy src="path" alt="" />
        </div>
        <ul class="list">
          <li v-for="(v, index) in list" :key="index" class="li">
            <div style="font-size: 0.4rem">
              {{ index + 1 }}
            </div>
            <img class="one1" v-lazy :src="v.imgurl" alt="" />
            <div class="user">
              <p>{{ v.name }}</p>
              <div class="xinxi w100">
                <img
                  src="https://lanhu.oss-cn-beijing.aliyuncs.com/ps1qzif04be7jjlgn002mxugpc0s27xa0v29cbaf47-bfea-4847-8844-39d0700cfa15"
                />
                <div>{{ v.rarevalue }}</div>
                <van-icon style="font-size: 0.3rem" name="down" />
              </div>
            </div>
            <img class="one2" :src="v.imgurl" alt="" />
          </li>
          <li class="li"></li>
          <li class="li"></li>
          <li class="li"></li>
        </ul>
      </div>
    </div>
    <div class="footer w100"></div>
  </div>
</template>

<script>
import { TopAPI } from "@/api/top";
export default {
  data() {
    return {
      list: [],
    };
  },
  methods: {
    back() {
      this.$router.back();
    },
  },
  computed: {
    path() {
      return this.list[0].imgUrl;
    },
  },
  async created() {
    const res = await TopAPI;
    console.log(res);
    this.list = res.data;
  },
};
</script>

<style scoped>
.top {
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(#b23cbf, #5bd1c5);
}
.header {
  height: 1rem;
  display: flex;
  align-items: center;
}
.hh {
  text-indent: 0.2rem;
}
.header1 {
  width: 80%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgb(248, 250, 252);
  font-size: 0.4rem;
}
.main {
  flex: 1;
  overflow-y: auto;
}
.title {
  font-size: 0.5rem;
  color: rgb(248, 250, 252);
  height: 1.5rem;
  line-height: 1.5rem;
  text-indent: 0.3rem;
}
.title span {
  font-size: 0.5rem;
}
.title img {
  margin-left: 0.7rem;
  margin-top: 0.2rem;
}
.content {
  width: 90%;
  display: flex;
  flex-direction: column;
  background-color: white;
  margin: 0 auto;
}
.photo {
  width: 100%;
  height: 0.6rem;
  display: flex;
  justify-content: center;
}
.one {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background-color: #d4b2d8;
  margin-top: -0.8rem;
  margin-left: 4rem;
}
.one1 {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background-color: #d4b2d8;
}
.one2 {
  width: 1.5rem;
  height: 1rem;
  background-color: #d4b2d8;
}
.user {
  width: 36%;
  height: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}
.user p {
  font-size: 0.3rem;
}
.xinxi {
  display: flex;
  justify-content: space-around;
}
.xinxi div {
  font-size: 0.3rem;
}
.list {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}
.li {
  width: 90%;
  height: 2rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: rgb(241, 244, 244);
  margin-top: 0.5rem;
}
.footer {
  height: 1rem;
  display: flex;
  font-size: 0.4rem;
}
</style>